package cn.labbook.bluetooth.controller;


import cn.labbook.bluetooth.common.ResultDto;
import cn.labbook.bluetooth.common.TokenManager;
import cn.labbook.bluetooth.constant.AdminConstant;
import cn.labbook.bluetooth.entity.Ammeter;
import cn.labbook.bluetooth.service.IServicePayService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author lonzy
 * @since 2019-03-26
 */
@Controller
@RequestMapping("//service/pay")
public class ServicePayController extends AbstractController {

    @Autowired
    IServicePayService servicePayService;


    @RequestMapping("page")
    @ResponseBody
    public ResultDto page(Page<Ammeter> page, Ammeter ammeter) {

        if(TokenManager.getToken().getAdmin().getAdminStatus()== AdminConstant.position.ZK||TokenManager.getToken().getAdmin().getAdminStatus()==AdminConstant.position.MANUFACTURERS){
//            i = servicePayService.servicePayStatistics();
        }else {
//            i = servicePayService.servicePayStatisticsByAdmin();
        }
        return null;
    }
}
